import React, {Component} from 'react';
import {BrowserRouter, Route,Switch} from 'react-router-dom';
import Login from './pages/login/login.js';
import Admin from './pages/admin/admin.js';
import index from './pages/official_website/index';

/*
应用的根组件
*/

export default class App extends Component {


    render() {
        return (
            <BrowserRouter>
                <Switch>{/*只匹配其中一个*/}
                <Route path='/login' component={Login}/>
                <Route path='/index' component={index}/>
                <Route path='/' component={Admin}/>
                </Switch>
            </BrowserRouter>
        )
    }

}